home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / DirGetSize.au3 < prev    next >
Text File  |  2006-06-17  |  494b  |  14 lines

  1. $size = DirGetSize("C:")
  2. Msgbox(0,"","Size(MegaBytes):" & Round($size / 1024 / 1024))
  3.  
  4. $size = DirGetSize("C:\Windows", 2)
  5. Msgbox(0,"","Size(MegaBytes):" & Round($size / 1024 / 1024))
  6.  
  7. $timer    = TimerInit()
  8. $size    = DirGetSize("\\10.0.0.1\h$",1)
  9. $diff    = Round(TimerDiff($timer) / 1000)    ; time in seconds
  10. If IsArray($size) Then
  11.     Msgbox(0,"DirGetSize-Info","Size(Bytes):" & $size[0] & @LF _
  12.         & "Files:" & $size[1] & @LF & "Dirs:" & $size[2] & @LF _
  13.         & "TimeDiff(Sec):" & $diff)
  14. EndIf